<div class="page">

    <div class="sidebar_page">
        <div class="content" id="video_content">
            <div id="articles">
                <div class="page_capt clearfix">
                    <div class="fl_left" id="video_categories">
                        <h2>Video</h2>
                        <div class="fl_right filter_opt">
                            <form id="video_filter_form" name="memb_filter_form" action="?page=video_search&ipp=24" method="get">
                                <label for="memb_filter_term">Traži</label>
                                <input type="hidden" name="page" value="video_search"/>
                                <input type="hidden" name="ipp" value="24"/>
                                <input class="inp_text" id="memb_filter_term" name="memb_filter_term" type="text" />
                                <label for="memb_filter_sort">Sortiraj po</label>
                                <select class="inp_select" id="memb_filter_sort" name="memb_filter_sort">
                                    <option value="naslov desc">naslovu opadajuce</option>
                                    <option value="naslov asc">naslovu rastuce</option>
                                    <option value="id asc">datumu unosa</option>
                                </select>
                                <input class="inp_btn" id="vid_filter_submit" name="vid_filter_submit" type="submit" value="Traži" />
                            </form>
                        </div>
                        <span><a href="?page=video">Svi</a></span>
                        {foreach from=$kategorije item='kategorija'}
                        <span><a href="?page=video&kategorija={$kategorija.kategorija}">{$kategorija.kategorija}</a></span>
                        {/foreach}
                    </div>
                    <iframe width="637" height="390" src="http://www.youtube.com/embed/{$mainVideo}?wmode=transparent" frameborder="0" allowfullscreen wmode="Opaque"></iframe>
                </div>
                <div><!--
                    <div id="tags"> <h4>Tags</h4>
                        <p>{$VideoTags}</p>
                    </div>-->
                    <div id="tags"> <h3>Opis:</h3>
                        <p>{$VideoDescription}</p>
                    </div>
                </div>
            </div>
            <div class="cols3spanL" id="botom_boxes">
                <div class="col">
                    <div id="comments">
                        <h2>Komentari</h2>
                        <p>Ukupno {$totalCommentedVideo} komentara.</p>
                        <ul>
                            {foreach from=$videoComments item='videoComment'}
                            <li class="clearfix" id="comment-id-">
                                <img class="fl_left" src="{if $videoComment.slika!=''}{$media}/autori/{$videoComment.username}/slike_za_profil/{$videoComment.slika}{else}{$media}/images/user_img.png{/if}" width="40" height="40" />
                                <span><a class="comment_aut" href="{$url}/?page=profil&clan_id={$videoComment.autor_id}">{$videoComment.username}</a> </span>{$videoComment.komentar}
                                <div>{$videoComment.datum_vreme_upisa}</div>
                            </li>
                            {/foreach}
                        </ul>
                        <h2 id="addCommentPage">Dodajte komentar</h2>
                        {if $userIsLogged}


                        <form id="comments_video_form" name="comments_form" action="handlers/video_comment_input.php?redirectUrl={$currentPage}" method="post">
                            <label for="comment_content">Komentar:</label><br />
                            <textarea id="comment_content" name="komentar" cols="" rows="4"></textarea>
                            <p class="tRight"><input id="comment_submit" name="comment_submit" type="submit" value="Dodaj komentar" /></p>
                            <input name="username" type="hidden" value="{$user.username}" />
                            <input name="url" type="hidden" value="{$mainVideo}" />
                        </form>
                        {else}
                        <h3>Ulogujte se kako bi dodali komentar. Hvala.</h3>
                        <br />
                        <p><a class="red" href="#account_box">Prijavi se</a> | <a class="red" href="{$url}/?page=registracija">Registruj se</a></p>
                        {/if}
                    </div>
                </div>
            </div>

        </div>
        <div class="sidebar" id="video_sidebar">
            <div class="video_block">
                {foreach from = $sideVideos item='sideVideo'}
                <div class="video_image">
                    <a href="?page=video&videoid={$sideVideo.id}&ipp=10{$kategorijaSidebarUrl}"><img width="106" height="64" src="{$sideVideo.thumb.0.url}" /></a>
                    <h4><a href="?page=video&videoid={$sideVideo.id}&ipp=10{$kategorijaSidebarUrl}">{$sideVideo.title}</a></h4>
                    <p>{$sideVideo.views} views</p>
                </div>
                {/foreach}
            </div>
            <div class="gal_nav">
                {$paginatorSidebarVideos}
            </div>

        </div>
    </div>
</div>